A torus (donut) having inner radius $2$ and outer radius $4$ sits on a flat table.  What is the radius of the largest spherical ball that can be placed on top of the center torus so that the ball still touches the horizontal plane?  (If the $xy$-plane is the table, the torus is formed by revolving the circle in the $xz$-plane centered at $(3,0,1)$ with radius $1$ about the $z$-axis. The spherical ball has its center on the $z$-axis and rests on either the table or the donut.)
Let $r$ be the radius of the sphere.  Let $O = (0,0,r)$ and $P = (3,0,1).$  We take a cross-section.

[asy]
unitsize(1 cm);

real r = 9/4;
pair O = (0,r), P = (3,1), T = interp(O,P,r/(r + 1));

draw((-4,0)--(4,0));
draw(Circle(P,1));
draw(Circle((-3,1),1));
draw(Circle(O,r));
draw(O--(0,0));
draw(O--P);
draw((3,1)--(0,1));
draw((3,1)--(3,0));

label("$r$", (O + T)/2, N);
label("$1$", (T + P)/2, N);
label("$1$", (3,1/2), E);
label("$1$", (0,1/2), W);
label("$r - 1$", (0,(r + 1)/2), W);
label("$3$", (3/2,0), S);

dot("$O$", O, N);
dot("$P$", P, NE);
[/asy]

Projecting $P$ onto the $z$-axis, we obtain a right triangle with legs 3 and $r - 1,$ and hypotenuse $r + 1.$  Then by the Pythagorean Theorem,
\[3 + (r - 1)^2 = (r + 1)^2.\]Solving, we find $r=\boxed{\frac{9}{4}}$.